package com.jhws.business.face.bo;

import javax.persistence.*;
import java.util.Date;

@Table(name = "face_info")
@Entity
public class FaceInfo {
    @Id
    @Column(name = "id")
    private String id;//主键
    @Column(name = "parent_id", columnDefinition = "varchar(255) default '0'")
    private String parentId;//父ID
    @Column(name = "owner_code")
    private String ownerCode; //业主ID
    @Column(name = "date")
    private Date date; //更新时间
    @Column(name = "type", columnDefinition = "INT default 0")
    private int type; //类型
    @Column(name = "comm_code")
    private String commCode; //小区编号
    @Column(name = "building")
    private String building; //栋号
    @Column(name = "unit")
    private String unit; //单元号
    @Column(name = "face_feature")
    private String faceFeature; //人脸特征
    @Column(name = "image_url")
    private String imageUrl; //照片地址
    @Column(name = "state", columnDefinition = "INT default 0")
    private int state; //状态 0：启用 1：禁用 2:删除
    @Column(name = "age", columnDefinition = "INT default 0")
    private int age; //人脸年龄
    @Column(name = "sex", columnDefinition = "INT default 0")
    private int sex; //人脸性别 -1: 未识别 1: 女性 2: 男性

    @Column(columnDefinition = "BIGINT(20) default 1")
    private Long timestamp;

    @Column(name = "is_synch", columnDefinition = "INT default 0")
    private int isSynch; //是否同步

    public Long getTimestamp() {
        return timestamp;
    }

    public void setTimestamp(Long timestamp) {
        this.timestamp = timestamp;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public String getOwnerCode() {
        return ownerCode;
    }

    public void setOwnerCode(String ownerCode) {
        this.ownerCode = ownerCode;
    }

    public Date getDate() {
        return date;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getCommCode() {
        return commCode;
    }

    public void setCommCode(String commCode) {
        this.commCode = commCode;
    }

    public String getBuilding() {
        return building;
    }

    public void setBuilding(String building) {
        this.building = building;
    }

    public String getUnit() {
        return unit;
    }

    public void setUnit(String unit) {
        this.unit = unit;
    }

    public String getFaceFeature() {
        return faceFeature;
    }

    public void setFaceFeature(String faceFeature) {
        this.faceFeature = faceFeature;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public int getIsSynch() {
        return isSynch;
    }

    public void setIsSynch(int isSynch) {
        this.isSynch = isSynch;
    }

    @Override
    public String toString() {
        return "FaceInfo{" +
                "id=" + id +
                ", parentId=" + parentId +
                ", ownerCode='" + ownerCode + '\'' +
                ", date=" + date +
                ", type=" + type +
                ", commCode='" + commCode + '\'' +
                ", building='" + building + '\'' +
                ", unit='" + unit + '\'' +
                ", faceFeature='" + faceFeature + '\'' +
                ", imageUrl='" + imageUrl + '\'' +
                ", state=" + state +
                ", age=" + age +
                ", sex=" + sex +
                ", timestamp=" + timestamp +
                ", isSynch=" + isSynch +
                '}';
    }
}
